package com.zmm.common.redis.key.member;

import com.zmm.common.redis.key.RedisKey;

/**
 * @author 900045
 * @description:
 * @name MemberKey
 * @date By 2021-06-22 14:23:30
 */
public enum MemberKey implements RedisKey {

	AUTH("auth:"),
	;

	/**
	 * key 前缀
	 */
	private String   key;


	MemberKey() {
		this.key = this.name();
	}

	MemberKey(String key) {
		this.key = key;
	}

	@Override
	public String getKey() {
		String suffix = getSuffix();
		if (suffix == null) {
			return key;
		}
		return new StringBuilder(this.key).append(SEPARATE).append(suffix).toString();
	}
}
